/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class MoxibustionDevice {
    static categoryCode = '010060010';

    static categoryName = '艾灸仪';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return MoxibustionDevice.categoryCode;
    }

    get categoryName() {
        return MoxibustionDevice.categoryName;
    }

    getDuration(params) {
        return command({
            method: 'getDuration',
            methodId: 'phEqB2EL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getGear(params) {
        return command({
            method: 'getGear',
            methodId: 'pgh07J5Z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRemainTime(params) {
        return command({
            method: 'getRemainTime',
            methodId: 'p1vZOVVr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pDrhtTAd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTargetTemperature(params) {
        return command({
            method: 'getTargetTemperature',
            methodId: 'pGoxGSYA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDuration(params) {
        return command({
            method: 'setDuration',
            methodId: 'pZgRqLgC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setGear(params) {
        return command({
            method: 'setGear',
            methodId: 'pUPQoZpU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAXzdfw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTargetTemperature(params) {
        return command({
            method: 'setTargetTemperature',
            methodId: 'peH39rvP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default MoxibustionDevice;
